<!DOCTYPE html><html><head><meta charset="utf-8"><style>.page_content{position:absolute;top:0;right:0;bottom:0;left:0}.img{position:absolute;top:40%;left:50%;transform:translate(-50%,-50%);width:500px;display:none}.text{text-align:center;position:absolute;top:60%;left:50%;transform:translate(-50%,-50%);color:#b5b4b4;font-size:20px}.close{text-align:center;position:absolute;top:70%;left:50%;transform:translate(-50%,-50%);color:#b5b4b4;font-size:16px}</style></head><body><div class="page_content"><img src="" class="img error_img"> <img src="" class="img success_img"></div><p class="text">服务调用成功！</p><p class="close">该页面将于 <span class="time"></span> 秒后自动关闭！</p><script>const keyWord = 'code';
      const urlList = window.location.search.slice(1).split('&') || [];
      let time = 5;
      document.getElementsByClassName('time')[0].innerHTML = time;
      const paramCollection = [
        {
          label: '参数异常，请检查keyWord或url参数！',
          state: 'error',
        },
        {
          value: 'RZCG',
          label: '认证成功!',
          state: 'success'
        },
        {
          value: 'ZHYCZ',
          label: '帐号已认证!',
          state: 'error'
        },{
          value: 'RZSB',
          label: '认证失败!',
          state: 'error'
        },
        {
          value: 'ZTJWZD',
          label: '状态机未找到!',
          state: 'error'
        },
        {
          value: 'ERRORPARAM',
          label: '传入信息错误!',
          state: 'error'
        }
      ];
      let keyVal = '';
      urlList.length > 0 && urlList.forEach((item) => {
        if (keyWord === item.split('=')[0]) {
          keyVal = item.split('=')[1]
        }
      });
      const paraResult = paramCollection.filter((item) => {
        return keyVal === item.value;
      });
      paraResult.length < 1 && paraResult.push(paramCollection[0]);
      document.getElementsByClassName('text')[0].innerHTML = paraResult[0].label;
      document.getElementsByClassName(`${paraResult[0].state}_img`)[0].style.display = 'block';
      let timer = setInterval(() => {
        document.getElementsByClassName('time')[0].innerHTML = --time;
        if (time == -1) {
          clearInterval(timer);
          window.close();
        }
      }, 1000);</script></body></html>